package com.ServiceImpl.Admin;

import com.Model.Admin.Role;
import com.Params.UserInfoParams;
import com.Service.Admin.RoleService;
import com.ServiceImpl.BaseSevice;

import java.util.List;

import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

@Service
public class RoleServiceImpl extends BaseSevice<Role> implements RoleService {
    @Override
    public PageInfo<Role> getRoleInfosByQuery(UserInfoParams userInfoParams) {
        //筛选条件
        Example example = new Example(Role.class);
        example.createCriteria().andCondition("1=1");
        List<Role> lst = (List<Role>) this.selectByExample(example);
        PageInfo<Role> info = new PageInfo<>(lst);
        return info;
    }

    @Override
    public List<Role> getRoleInfos() {
        //筛选条件
        Example example = new Example(Role.class);
        example.createCriteria().andCondition("1=1");
        List<Role> lst = (List<Role>) this.selectByExample(example);

        return lst;
    }

    @Override
    public boolean SaveRole(Role rinfo) {
        return false;
    }

    @Override
    public boolean delRole(String roleId) {
        return false;
    }

    @Override
    public boolean updateRole(Role rinfo) {
        return false;
    }
}
